import 'package:flutter/material.dart';
import 'package:flutter_note/config/router_config.dart' as RouterManager;
import 'package:flutter_note/config/ui_adapter_config.dart';
import 'package:oktoast/oktoast.dart';

void main() {
  var widgetsBinding = InnerWidgetsFlutterBinding.ensureInitialized();

  widgetsBinding
    ..attachRootWidget(MyApp())
    ..scheduleWarmUpFrame();
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return OKToast(
      child: MaterialApp(
        title: 'notebook',
        debugShowCheckedModeBanner: false,
        theme: ThemeData(
            primaryColor: Color(0xFFf05b72),
            primaryColorDark: Color(0xFFf05b72),
            accentColor: Color(0xFFF2F2F2),
            backgroundColor: Color(0xFFFFFFFF)),
        onGenerateRoute: RouterManager.Router.generateRouter,
        initialRoute: RouterManager.RouteName.home,
      ),
    );
  }
}
